/**
 * 
 */
package org.rhq.plugins.tools.httpcheck;

import java.util.HashSet;
import java.util.Set;

import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;

/**
 * 
 * @author lgao
 *
 */
public class HttpCheckServerDiscoveryComponent implements ResourceDiscoveryComponent<HttpCheckResourceComponent>{

	public Set<DiscoveredResourceDetails> discoverResources(
			ResourceDiscoveryContext<HttpCheckResourceComponent> context)
			throws InvalidPluginConfigurationException, Exception {
		Set<DiscoveredResourceDetails> result = new HashSet<DiscoveredResourceDetails>();
		String resourceKey = "HTTP_CHECK";
		String resourceName = "Http Checker";
		String resourceVersion = "1.0.0";
		String resourceDescription = "Http Checker, which is responsible for checking http server accessibilities.";
		DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), resourceKey, resourceName, resourceVersion, resourceDescription, null, null);
		result.add(resource);
		return result;
	}
	
}
